home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CICA Windows Explosion!
/
The CICA Windows Explosion! - Disc 2.iso
/
programr
/
cat_exe.zip
/
TRIANGLE.CAR
< prev
next >
Wrap
Text File
|
1994-11-17
|
998b
|
52 lines
(* program creates triangels *)
RECIPE XYSize = 40;
XYBound = 1;
Colors = 2;
Zet = 2;
CONST Dead = 0;
Alive = 1;
VAR x;
REF right [1,0];
left [-1,0];
top [0,-1];
bottom [0,1];
bottom_right [1,1];
bottom_left [-1,1];
top_right [1,-1];
top_left [-1,-1];
EVENT SetUp;
RingForm;
PlClipAll;
RGBPalette(Colors, $0, $FF, $32,0, $B6,0);
ShowPlane;
EVENT E1;(* initialization of the plane *)
PlClipActive;
WinClipAll;
PARALLEL DO
x := Random (1000);
IF (x > 995)
THEN Self := Alive;
ELSE Self := Dead;
FI;
OD;
ShowPlane;
EVENT E2;
PlClipActive;
PARALLEL DO
IF (right = Alive) OR
(left = Alive) OR
(bottom = Alive)
THEN Self := Alive
FI;
OD;
ShowPlane;
END.